package com.cos.shop.dao;

import com.cos.shop.entity.Cart;

import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

/**
 * @author: COS
 * @time: 2022/2/24 8:59
 * @description:
 */
public interface CartDao {

    Cart getCartByUidAndPid(int uid, int pid) throws SQLException, InvocationTargetException, IllegalAccessException;

    int updateCart(Cart c) throws SQLException;

    int addCart(Cart c) throws SQLException;

    List<Cart> getCartByUid(int uid) throws SQLException, InvocationTargetException, IllegalAccessException;

    int clearCart(int uid) throws SQLException;

    int deleteCart(int uid, int pid) throws SQLException;
}
